package StudyCode.summary.myfile;

import java.io.IOException;
import java.nio.file.FileStore;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.UserDefinedFileAttributeView;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CheckUserDefinedAttributesSupportability {
	public static void main(String[] args) {
		Path path = Paths.get("E:\\迅雷下载", "test1.txt");

		try {
			FileStore store = Files.getFileStore(path);
			if (!store.supportsFileAttributeView(UserDefinedFileAttributeView.class)) {
				System.out.println("用户定义的不支持属性: " + store);
			} else {
				System.out.println("用户定义的支持属性: " + store);
			}
		} catch (IOException e) {
			System.err.println(e);
		}
	}
}
